package zoodemo;

public class Feeder {
    public Feeder(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected String name;

    public void feed(Food food,Dog dog){
        dog.eat(food);
        dog.shout();
    }
    public void feed(Food food,Cat cat){
        cat.eat(food);
        cat.shout();
    }
    public void say(){
        System.out.println("欢迎大家来到动物员我叫"+this.name);
    }

}
